#pragma once

#include "dynamictreewidgetitembase.h"

class QCheckBox;

namespace PublicGui
{
	class DynamicSingleCheckBox:public DynamicTreeWidgetItemBase
	{
		Q_OBJECT
	public:
		DynamicSingleCheckBox(const QString& mtext = "");
		~DynamicSingleCheckBox();
		virtual void setItemData(CoreBase::ActorBase* actorptr,const QString& tag);
		virtual QVariant getItemData();
		virtual void setLabelTextList(QStringList mtext);

	protected:
		virtual void initializationUi();
		virtual void emitValueChanged();
		QCheckBox*						_checkBox;
		QString							_checkState;
		QString							_oldValue;
	private slots:
		void slotValueChanged(bool);
	protected slots:
		virtual void slotFocusChanged(QWidget*,QWidget*);
	};
}